const check_login = () => {
    let nowTime = new Date().getTime();
    let lastTime = localStorage.getItem("lastTime") || 0;
    if(nowTime-lastTime > 24*60*60*1000){
        // 两次的登录时间超过24小时
        localStorage.setItem("login",false);
        return false;
    }
    // 否则自动登录
    localStorage.setItem("lastTime",nowTime);
    localStorage.setItem("login",true);
    return true;
}
export {
    check_login
}